package com.huakang.controller;

import com.huakang.entity.Medsci;
import com.huakang.service.MedsciService;
import com.huakang.utils.MedsciVo;
import com.huakang.utils.ResultVo;
import com.huakang.utils.SeeadoctorVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author{一只小呆瓜}
 * @Date2025/1/15 12:15
 */
@RestController
@RequestMapping("/medsci")
public class MedsciController {
    @Autowired
    private MedsciService medsciService;
    @RequestMapping("/findAll")
    public ResultVo findAll(){
        List<MedsciVo> medsciList = medsciService.findMedsci();
        return ResultVo.success("查询成功",medsciList);
    }
    @GetMapping(value = "/findByName")
    public ResultVo findByName(String input){
        List<MedsciVo> medsciVos = medsciService.findByName(input);
        return ResultVo.success("查询成功",medsciVos);
    }

}
